# 【练习】猜拳游戏
# 编写一个Python程序，实现一个简单的猜拳游戏。玩家和电脑各自选择石头、剪刀或布，根据规则判断胜负关系，并输出比赛结果。
from 测吧.src.week1.day4.guessing_game import *
def test_guessing_game():
    result = guessing_game("石头")
    if "石头" in result:
        assert result == "平局(电脑：石头)"
    elif "剪刀" in result:
        assert result == "你赢了(电脑：剪刀)"
    else:
        assert result == "你输了(电脑：布)"

    result = guessing_game("剪刀")
    if "石头" in result:
        assert result == "你输了(电脑：石头)"
    elif "剪刀" in result:
        assert result == "平局(电脑：剪刀)"
    else:
        assert result == "你赢了(电脑：布)"

    result = guessing_game("布")
    if "石头" in result:
        assert result == "你赢了(电脑：石头)"
    elif "剪刀" in result:
        assert result == "你输了(电脑：剪刀)"
    else:
        assert result == "平局(电脑：布)"
test_guessing_game()